The present disclosure relates to a technique for controlling allocation of data into a cache storage.
A data processing apparatus may support speculative execution of instructions, in which instructions are executed before it is known whether input operands for the instruction are correct or whether the instruction needs to be executed at all. For example, a processing apparatus may have a branch predictor for predicting outcomes of branch instructions so that subsequent instructions can be fetched, decoded and executed speculatively before it is known what the real outcome of the branch should be. Also some systems may support data prefetching as a form speculation where values are loaded from memory in anticipation of them being needed by the processing circuitry, to allow subsequent instructions to be processed faster. Other forms of speculation are also possible.
It has recently been identified that in certain instances allocation of data into the cache storage based on speculative execution of instructions can open up a source of attack to seek to identify sensitive data. For example, information has recently been published about speculation-based cache timing side-channel attacks, where a number of techniques can be used so that cache timing analysis can be abused to leak information out of mis-speculated execution of instructions.